package com.example.gateway.Controller;

import com.example.gateway.Config.TestDatasourceConfig;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(value = "测试转发",tags = {"测试接口"})
@Slf4j
@RequestMapping("/auth")
@RestController
public class TestController {

    @Resource
    private TestDatasourceConfig testDatasourceConfig;

    @GetMapping("/test")
    @ApiOperation(value = "测试")
    public String testController(){
        return testDatasourceConfig.getUrl();
    }

}
